package main

import (
	"log"
	"os"
)

var logger *log.Logger
func initLog() *log.Logger {
	logFile, err := os.OpenFile("./c.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0644)
	if err != nil {
		log.Panic("打开日志文件异常")
	}
	//logger := log.New(os.Stdout, "[ske]", log.Ldate|log.Ltime)
	return log.New(logFile, "[ske]", log.Ldate|log.Ltime)
}

func main() {
	logger = initLog()
	logger.Println("aiya")
}

